{% extends 'admin/dashboard.html' %}

{% block content %}
<div class="card">
    <h2 class="text-xl font-bold mb-4">编辑职位</h2>
    <form method="post" enctype="multipart/form-data">
        <div class="mb-4">
            <label for="title" class="block text-sm font-medium text-gray-700">职位名称</label>
            <input type="text" id="title" name="title" value="{{ job.title }}" class="mt-1 p-2 w-full border rounded-md">
        </div>
        <div class="mb-4">
            <label for="department" class="block text-sm font-medium text-gray-700">部门</label>
            <input type="text" id="department" name="department" value="{{ job.department }}" class="mt-1 p-2 w-full border rounded-md">
        </div>
        <div class="mb-4">
            <label for="location" class="block text-sm font-medium text-gray-700">工作地点</label>
            <input type="text" id="location" name="location" value="{{ job.location }}" class="mt-1 p-2 w-full border rounded-md">
        </div>
        <div class="mb-4">
            <label for="requirements" class="block text-sm font-medium text-gray-700">职位要求</label>
            <textarea id="requirements" name="requirements" rows="4" class="mt-1 p-2 w-full border rounded-md">{{ job.requirements }}</textarea>
        </div>
        <div class="mb-4">
            <label for="responsibilities" class="block text-sm font-medium text-gray-700">工作职责</label>
            <textarea id="responsibilities" name="responsibilities" rows="4" class="mt-1 p-2 w-full border rounded-md">{{ job.responsibilities }}</textarea>
        </div>
        <div class="mb-4">
            <label for="sort_order" class="block text-sm font-medium text-gray-700">排序</label>
            <input type="number" id="sort_order" name="sort_order" value="{{ job.sort_order }}" class="mt-1 p-2 w-full border rounded-md">
        </div>
        <button type="submit" class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600">保存修改</button>
    </form>
</div>
{% endblock %}